/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package servercom;

/**
 *
 * @author DELL INSPIRON N5010
 */
public class CellDAO {
    String _type;
    String _value;

    public String getType() {
        return _type;
    }

    public void setType(String _type) {
        this._type = _type;
    }

    public String getValue() {
        return _value;
    }

    public void setValue(String _value) {
        this._value = _value;
    }

    public boolean Compare(CellDAO get) {
        if(_type.equalsIgnoreCase("int"))
        {
            try
            {
                if(Integer.parseInt(_value) == Integer.parseInt(get._value))
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            catch(Exception e)
            {
                return false;
            }
        }else // type = "string"
        {
            if(_value.equalsIgnoreCase(get._value))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
